package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.api.domain.ActivityRewardLog;
import com.juyu.miliao.api.domain.vo.ActivityRewardLogVO;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author xuanqicheng
 */
@Repository
public class ActivityRewardLogDao {

    @Autowired
    private SqlSession sqlSession;

    public void insertActivityRewardLog(ActivityRewardLog obj){
        sqlSession.insert("insertActivityRewardLog",obj);
    }

    public List<ActivityRewardLogVO> getRewardsLog(Map<String, Object> params) {
        return sqlSession.selectList("ActivityRewardLogByUserIdAndType",params);
    }
}
